<template>
 <div class="banner">
 <div class="banxin">
     <img :src="src" alt="">
     <a v-if="href" :href="href"></a>
 </div>
 </div>
</template>
 
<script>
export default {
    props:['src','href'],
 data () {
 return {

 }
 }
}
</script>
 
<style lang = "less" scoped>
 .banner{
     position: relative;
     img{
         width: 100%;
     }
     a{
         position: absolute;
         left: 0;
         top: 0;
         width: 100%;
         height: 100%;
     }
 }
</style>